package com.google.rui.demos.tabhost;

import android.app.Activity;
import android.os.Handler;
import android.os.Message;

import com.google.rui.demos.R;

public class ActivityA extends Activity {
   protected void onCreate(android.os.Bundle savedInstanceState) {
	   super.onCreate(savedInstanceState);
	   setContentView(R.layout.tabhost_info_layout01);
	   mHandler.sendEmptyMessage(1);
	   
   };
   Handler mHandler=new Handler(){

	@Override
	public void handleMessage(Message msg) {
		// TODO Auto-generated method stub
		super.handleMessage(msg);
		switch(msg.what){
		case 1:
			new Thread(new Runnable() {
				
				@Override
				public void run() {
					// TODO Auto-generated method stub
					try {
						int i=0;
						while(i<100){
						Thread.sleep(1000);
						System.out.println("休息1s"+ " "+ i++);
						}
					} catch (InterruptedException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
					
				}
			}).start();
			break;
			
		}
	}
	   
	   
   };
}
